import request from '@/utils/request'

// 发送面经列表信息 传页码
export const getListInfoApi = (current) => {
  return request.get('/admin/interview/query', { params: { current } })
}

// 新增信息请求
export const addArticleApi = (data) => {
  return request.post('/admin/interview/create', data)
}

// 封装删除请求
export const delArticleApi = (id) => {
  return request({
    url: '/admin/interview/remove',
    method: 'DELETE',
    data: {
      id
    }
  })
}

// 封装查询最新数据详情
export const getDateArticleApi = (id) => {
  return request({
    url: '/admin/interview/show',
    method: 'get',
    params: {
      id
    }
  })
}

// 封装更新数据
export const updateArticleApi = (data) => {
  return request({
    url: '/admin/interview/update',
    method: 'put',
    data
  })
}
